package com.im.common.annotation;

import java.lang.annotation.*;

/**
 * 频控注解（适合于多机）
 *
 * @author yunZhouJiaDi
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface RedisLimit {

    String name() default "";

    String key() default "";

    String prefix() default "";

    int period();

    int count();

    LimitType limitType() default LimitType.CUSTOMER;

    enum LimitType {

        CUSTOMER,

        IP;
    }
}
